<?php
	header("content-type:text/html;charset=utf8");
	$pdo = new PDO('mysql:host=127.0.0.1;dbname=kycp;charset=utf8','root','root');
	$id = $_GET['id'];
	$sql = "select * from ceshi where id=$id";
	$data = $pdo->query($sql)->fetch(PDO::FETCH_ASSOC);
	// echo "<pre/>";
	// print_r($data);
?>
<!DOCTYPE html>
<html>
<head>
	<title>修改页面</title>
	<meta charset="utf-8">
</head>
<body>
	<center>
		<table>
			<form action="update_do.php?id=<?= $data['id']?>" method="post">
				<p>姓名 <input type="text" name="name" value="<?=$data['name']?>"></p>
				<p>密码 <input type="password" name="pwd" value="<?=$data['pwd']?>"></p>
				<p>年龄 <input type="text" name="age" value="<?=$data['age']?>"></p>
				<p>性别 <input type="radio" name="sex" value="1">男<input type="radio" name="sex" value="2">女      
				</p>
				<p>手机号 <input type="text" name="phone" value="<?=$data['phone']?>"></p>
				<p>身份证号 <input type="text" name="id_card" value="<?=$data['id_card']?>"></p>
				<p>
					<input type="submit" value="修改">
				</p>
			</form>
		</table>
	</center>
</body>
</html>